package com.example.demo.entity.base;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 树形节点
 * </p>
 *
 * @author zhaiding
 * @since 2019-6-16
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class TreeNode extends BaseEntity {

    private static final long serialVersionUID = -3669564900275305831L;
    /**
     * 父 id
     */
    private Long parentId;

    /**
     * 子节点
     */
    private List<TreeNode> children = new ArrayList<>();
}